/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package py.una.pol.ii.is2.domain.sistema;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author markos
 */
@Embeddable
public class PantRolPK implements Serializable {
    @Basic(optional = false)
    @Column(name = "paro_rol")
    private int paroRol;
    @Basic(optional = false)
    @Column(name = "paro_pantalla")
    private String paroPantalla;

    public PantRolPK() {
    }

    public PantRolPK(int paroRol, String paroPantalla) {
        this.paroRol = paroRol;
        this.paroPantalla = paroPantalla;
    }

    public int getParoRol() {
        return paroRol;
    }

    public void setParoRol(int paroRol) {
        this.paroRol = paroRol;
    }

    public String getParoPantalla() {
        return paroPantalla;
    }

    public void setParoPantalla(String paroPantalla) {
        this.paroPantalla = paroPantalla;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) paroRol;
        hash += (paroPantalla != null ? paroPantalla.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof PantRolPK)) {
            return false;
        }
        PantRolPK other = (PantRolPK) object;
        if (this.paroRol != other.paroRol) {
            return false;
        }
        if ((this.paroPantalla == null && other.paroPantalla != null) || (this.paroPantalla != null && !this.paroPantalla.equals(other.paroPantalla))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "py.una.pol.ii.is2.dao.flota.PantRolPK[paroRol=" + paroRol + ", paroPantalla=" + paroPantalla + "]";
    }

}
